-
Notifications
You must be signed in to change notification settings - Fork 126
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix mesh vertex spacing #323
Conversation
ea1dc42
to
3ce0e89
Compare
This commit fixes some of the issues with ArrayMesh, Occluder3D and NavigationMesh baking. Basically, a few places scale the wrong thing, giving the output the appearance of having been scaled twice. Unfortunately there still seems to be some kind of issue specifically with navmesh baking that I don't have time to look into at the moment. It could be another navmesh-related engine issue, because baking other kinds of meshes shows no issues here. I've only briefly looked at the effect of vertex spacing on slope sculpting. It appears to be "spiky" whenever vertex spacing is below or above 1. |
Thank you, I have added the fix for the arraymesh/occlusion/navigation generation. I also simplified the scaling code. I generated a section and it seems fine. Note that with 3x mesh scaling, the total size of the navigation mesh increases 3x. There is a finite limit on the size of what can be generated, so I painted a much smaller navigable section and it generated fine. I've never tried any AABB nav mesh generation so don't know what is working properly or not. I also fixed the last row of collision and am looking at the dithered brushing now. |
I fixed the dithered brush and slope sculpting heights. The only remaining things are: AABB, and reviewing the code. |
@tcoxon Edited aabb is wrong in the main tree. Flattening the demo mountain peak w/ vertex scaling:
This pr:
That scaling looks right to me. I think this PR is now done. |
118630f
to
bc02497
Compare
@tcoxon I'm going to merge this in so we can get more people using and testing. If there's a specific problem with edited_area we can follow up in another issue. Hopefully before I release 0.9.1, but I want to release it soon. Maybe today. |
#296 Mesh scaling did not address Storage or Editor. Only the mouse position was scaled. This means get_height and other storage functions didn't work.
This PR adds on to the work done by @lfxu to ensure the API is global. That is all function calls (eg get_height) operate in absolute global positions. If looking at the height of a mountain peak with
get_height(512, 512)
, then you set vertex spacing to 2.0, you'll need to query that mountain peak withget_height(1024, 1024)
.Working